/**
 * SalesMonthService.java
 * Copyright(C) 1949++ 中华人民共和国
 * 深圳市盛开互联网金融顾问有限公司.
 * All rights reserved.
 * E-mail:server@skjr.net
 * Date:2017-11-24 11:49:03
 */
package com.huamao.zh.service.impl;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.huamao.zh.base.PageWrapper;
import com.huamao.zh.mapper.SalesMonthMapper;
import com.huamao.zh.model.SktSalesMonth;
import com.huamao.zh.service.SalesMonthService;

@Service
@Transactional
public class SalesMonthServiceImpl implements SalesMonthService {

	@Autowired
	private SalesMonthMapper salesMonthMapper;

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public SktSalesMonth add(SktSalesMonth salesMonth) throws Exception {
		salesMonthMapper.add(salesMonth);
		return salesMonth;
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public SktSalesMonth addSelective(SktSalesMonth salesMonth) throws Exception {
		salesMonthMapper.addSelective(salesMonth);
		return salesMonth;
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public int delete(Map<String, Object> map) {
		return salesMonthMapper.delete(map);
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public int update(SktSalesMonth salesMonth) throws Exception {
		return salesMonthMapper.update(salesMonth);
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public int updateSelective(SktSalesMonth salesMonth) throws Exception {
		return salesMonthMapper.updateSelective(salesMonth);
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public SktSalesMonth get(Integer id) {
		SktSalesMonth salesMonth = salesMonthMapper.get(id);
		return salesMonth;
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public PageWrapper<SktSalesMonth> search(PageWrapper<SktSalesMonth> pageWrapper) {
		List<SktSalesMonth> salesMonths = salesMonthMapper.search(pageWrapper);
		pageWrapper.setList(salesMonths);
		return pageWrapper;
	}

	/**
	 * 功能说明： Author： Date:2017-11-24 11:49:03
	 */
	public List<SktSalesMonth> queryList(Map<String, Object> map) {
		return salesMonthMapper.queryList(map);
	}

	@Override
	public BigDecimal getSalesMonth(Map<String, Object> map) {
		return salesMonthMapper.getSalesMonth(map);
	}
}